package snsdbook.servlets;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import snsdbook.engine.PaginatedContentList;

/**
 * Servlet implementation class ShowContentServlet
 */
public class ShowContentServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public ShowContentServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		int id = Integer.valueOf(request.getParameter("id"));
		
		request.setAttribute("header_title", "HAI THIS IS UR CIZBURGER?");
		
		PaginatedContentList.Display(
		    new int[] {id},
		    /* show_searchbar =  */ false,
		    /* show_comments = */ true,
		    /* show_pagination = */ false,
		    /* is_short = */ false,
		    /* page = */ 0,
		    request,
		    response);
	}

}
